import random

sms_code = "%06d" % random.randint(1, 999999)
sms_code = sms_code[:random.randint(4, 6)]

# 打印生成的短信验证码
print("生成的短信验证码是:", sms_code)
